<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|

<<<<<<< HEAD
// Route::get('/', function () {
//     return view('admin/category/CategoryList');
// });

 */

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|

<<<<<<< HEAD
// Route::get('/', function () {
//     return view('admin/category/CategoryList');
// });

 */

/**************************后台权限管理****************************/
//    登陆页面
Route::any('admin/login', 'Admin\LoginController@login');

Route::group(['prefix' => 'admin', 'namespace' => 'Admin', 'middleware' => 'adminlogin'], function () {
	//    密码修改
	Route::any('password', 'LoginController@pass');

	//    密码修改提交
	Route::any('password/changedit', 'LoginController@changedit');
	// 首页
	Route::any('index', 'IndexController@index');
	//    退出
	Route::any('login/quit', 'LoginController@quit');

//    *********************前台用户管理*************************************************

	//    前台用户管理
	Route::resource('person', 'PersonController');
	Route::any('person', 'PersonController@index');
	Route::any('person/show', 'PersonController@show');
//    Route::resource('user','UserController');
	//   前台用户排序
	Route::post('person/changeOrder', 'PersonController@changeOrder');
//    前台用户登录权限
	Route::post('person/changeSta', 'PersonController@changeSta');
//    前台用户添加
	Route::post('person/changeadd', 'PersonController@changeadd');

//    ******************************用户管理****************************************************************
	////    首页
	//    Route::any('index', 'IndexController@index');
	//    用户管理
	Route::resource('user', 'UserController');
	Route::post('user/show', 'MessageController@show');
//    用户排序
	Route::post('user/changeOrder', 'UserController@changeOrder');
//    用户登录权限
	Route::post('user/changeSta', 'UserController@changeSta');
//    搜索
	Route::post('user/chanf', 'UserController@chanf');
//////////////
	Route::get('slel', 'SingleController@slel');

// *********************   用户管理**********************************************
	Route::any('user', 'UserController@index');
	Route::any('user/show', 'UserController@show');
//    用户添加
	Route::post('user/changeadd', 'UserController@changeadd');
	//    角色中间表添加页面
	Route::get('riddle/{id}', 'UserController@cherg');
//    角色中间表添加
	Route::post('riddle', 'UserController@cherg');

	//  *********************************角色管理************************************************

//    角色管理
	Route::resource('role', 'RoleController');
//    角色排序
	Route::post('role/changeOrder', 'RoleController@changeOrder');
//   权限中间表添加页面
	Route::get('middle/{id}', 'RoleController@cherg');
//    权限中间表添加
	Route::post('middle', 'RoleController@cherg');

//    ***********************************权限管理*****************************************************************
	//    权限管理
	Route::resource('rule', 'RulesController');
//    权限排序
	Route::post('rule/changeOrder', 'RulesController@changeOrder');
	Route::any('rule/show', 'RulesController@show');
//    中间表添加
	Route::post('role_rule', 'RulesController@cherg');
	// 是否显示菜单
	Route::post('rule/changeSta', 'RulesController@changeSta');

//    **********************************轮播图***************************************
	//    轮播图
	Route::resource('album', 'AlbumController');
//    相册添加
	Route::post('album/changeadd', 'AlbumController@changeadd');
//    相册排序
	Route::post('album/changeOrder', 'AlbumController@changeOrder');
//    相册修改
	Route::post('album/changedit', 'AlbumController@changedit');
//    相册插件
	Route::any('upload', 'AlbumController@upload');
//    相片之间关联表单
	Route::any('album/chan', 'AlbumController@chan');
//    相册下面的相片
	Route::any('album/child', 'AlbumController@child');
//    替换相册图片
	Route::post('album/repeact', 'AlbumController@repeact');

//    **********************************相片管理********************************************************

//    相片
	Route::resource('banner', 'BannerController');
	// 相片修改
	Route::post('banner/changedit', 'BannerController@changedit');
//    相片排序
	Route::post('banner/changeOrder', 'BannerController@changeOrder');

//    ******************************留言管理****************************************************
	//    对话管理
	Route::resource('message', 'MessageController');
	Route::post('message/show', 'MessageController@show');
//    会话窗口
	Route::get('mess', 'MessageController@mess');
//    会话添加
	Route::post('mess/messadd', 'MessageController@messadd');
//    查看会话
	Route::get('mess/find', 'MessageController@find');

//    *****************************广告管理**********************************************************
	//    广告列表
	Route::resource('adver', 'AdverController');
//    广告添加
	Route::any('adver/chan', 'AdverController@chan');
//    广告排序
	Route::post('adver/changeOrder', 'AdverController@changeOrder');
//    广告修改
	Route::post('adver/changedit', 'AdverController@changedit');

});

/**************************后台良品购管理****************************/
//后台良品购列表/搜索
Route::get('admin/LianggoodsList', 'Admin\LianggoodsController@lianggoodsshow');
//后台良品购添加
Route::get('admin/LianggoodsAdd', 'Admin\LianggoodsController@lianggoodsadd');
Route::post('admin/LianggoodsAddData', 'Admin\LianggoodsController@lianggoodsadddata');

//后台良品购修改
Route::get('admin/LianggoodsEdit', 'Admin\LianggoodsController@lianggoodsedit');
Route::post('admin/LianggoodsEditData/{page}/{search?}', 'Admin\LianggoodsController@lianggoodseditdata');
//后台良品购删除
Route::get('admin/LianggoodsDel', 'Admin\LianggoodsController@lianggoodsdel');
/**************************后台标签管理****************************/
//后台标签列表/搜索
Route::get('admin/LabelList', 'Admin\LabelController@labelshow');
//后台标签添加
Route::get('admin/LabelAdd', 'Admin\LabelController@labeladd');
Route::post('admin/LabelAddData', 'Admin\LabelController@labeladddata');
//后台标签修改
Route::get('admin/LabelEdit', 'Admin\LabelController@labeledit');
Route::post('admin/LabelEditData/{page}/{search?}', 'Admin\LabelController@labeleditdata');
//后台标签删除
Route::get('admin/LabelDel', 'Admin\LabelController@labeldel');
/**************************后台单品管理****************************/
//后台单品列表/搜索
Route::get('admin/SingleList', 'Admin\SingleController@singleshow');
//后台单品添加
Route::get('admin/SingleAdd', 'Admin\SingleController@singleadd');

Route::post('admin/SingleAddData', 'Admin\SingleController@singleadddata');

//后台单品修改
Route::get('admin/SingleEdit', 'Admin\SingleController@singleedit');

Route::post('admin/SingleEditData/{page}/{search?}', 'Admin\SingleController@singleeditdata');
//后台单品删除
Route::get('admin/SingleDel', 'Admin\SingleController@singledel');

//后台帮帮列表
Route::any('admin/HelpList', 'Admin\HelpController@helpshow');
//后台帮帮添加
Route::get('admin/HelpAdd', 'Admin\HelpController@helpadd');
Route::post('admin/HelpAddData', 'Admin\HelpController@helpadddata');
//后台帮帮修改
Route::get('admin/HelpEdit', 'Admin\HelpController@helpedit');
Route::post('admin/HelpEditData', 'Admin\HelpController@helpeditdata');
//后台帮帮删除
Route::get('admin/HelpDel', 'Admin\HelpController@helpdel');

/**************************后台会员管理****************************/
//后台会员管理
Route::get('admin/Member', 'Admin\MemberController@member');
Route::get('admin/memberdata', 'Admin\MemberController@memberdata');
Route::any('admin/changeStatus', 'Admin\MemberController@changestatus');
//后台专辑的管理
Route::get('admin/special', 'Admin\SpecialController@special');
Route::get('admin/specialdata', 'Admin\SpecialController@specialdata');
Route::any('admin/changeBan', 'Admin\SpecialController@changeban');
/****************************后台友情链接管理*****************************************/
//添加友情链接
Route::any('admin/Link', 'Admin\LinkController@link');
Route::any('admin/LinkCreate', 'Admin\LinkController@create');
Route::any('admin/CreateData', 'Admin\LinkController@createdata');
Route::any('admin/LinkDel/{id}', 'Admin\LinkController@linkdel');
Route::any('admin/LinkEdit/{id}', 'Admin\LinkController@linkedit');
Route::any('admin/EditData/{id}', 'Admin\LinkController@editdata');
//后台向前台发送消息
Route::any('admin/Send', 'Admin\MemberController@news');
Route::any('admin/NewsDel/{id}', 'Admin\MemberController@newsdel');
/***************************文章管理*********************************/
Route::get('admin/article', 'Admin\ArtController@articleshow');
/**************************意见管理*********************************/
Route::get('admin/messs', 'Admin\MessController@messshow');

/**************************后台招聘管理********************************/
//职业分类
Route::get('admin/joblist', 'Admin\JobController@joblist');
Route::get('admin/jobadd', 'Admin\JobController@jobadd');
Route::post('admin/jobadddata', 'Admin\JobController@jobadddata');
Route::get('admin/jobedit', 'Admin\JobController@jobedit');
Route::post('admin/jobeditdata', 'Admin\JobController@jobeditdata');
Route::get('admin/jobdel', 'Admin\JobController@jobdel');
//职业管理
Route::get('admin/sjobadd', 'Admin\JobController@sjobadd');
Route::post('admin/sjobadddata', 'Admin\JobController@sjobadddata');
Route::get('admin/sjoblist', 'Admin\JobController@sjoblist');
Route::get('admin/sjobedit', 'Admin\JobController@sjobedit');
Route::post('admin/sjobeditdata', 'Admin\JobController@sjobeditdata');
Route::get('admin/sjobdel', 'Admin\JobController@sjobdel');
//职业描述管理
Route::get('admin/job_need', 'Admin\JobController@jobneed');
Route::get('admin/job_needadd', 'Admin\JobController@needadd');
Route::post('admin/jobneedadddata', 'Admin\JobController@needadddata');
Route::get('admin/jobneededit', 'Admin\JobController@neededit');
Route::post('admin/jobneededitdata', 'Admin\JobController@neededitdata');
Route::get('admin/jobneeddel', 'Admin\JobController@needdel');
//内涵接口
Route::get('admin/haha', 'Admin\HaController@haha');

/*****************************音乐管理********************************/
Route::get('admin/music', 'Admin\MusicController@musiclist');
Route::get('admin/musicadd', 'Admin\MusicController@musicadd');
Route::post('admin/musicadddata', 'Admin\MusicController@musicadddata');
Route::get('admin/musicedit', 'Admin\MusicController@musicedit');
Route::get('admin/musicdel', 'Admin\MusicController@musicdel');
Route::post('admin/musiceditdata', 'Admin\MusicController@musiceditdata');
/**************************后台点赞管理****************************/
//后台点赞列表/搜索
Route::get('admin/ZanList', 'Admin\ZanController@zanshow');
//后台点赞状态修改
Route::get('admin/ZanEdit', 'Admin\ZanController@zanedit');
//后台点赞删除
Route::get('admin/ZanDel', 'Admin\ZanController@zandel');

/**************************后台收藏管理****************************/
//后台收藏列表/搜索
Route::get('admin/CollectList', 'Admin\CollectController@collectshow');
//后台收藏状态修改
Route::get('admin/CollectEdit', 'Admin\CollectController@collectedit');
//后台收藏删除
Route::get('admin/CollectDel', 'Admin\CollectController@collectdel');

/**************************后台达人管理****************************/
//后台达人列表
Route::get('admin/DarenList', 'Admin\DarenController@darenshow');
//后台达人添加
Route::get('admin/DarenAdd', 'Admin\DarenController@darenadd');
Route::post('admin/DarenAddData', 'Admin\DarenController@darenadddata');
//后台达人删除
Route::get('admin/DarenDel', 'Admin\DarenController@darendel');
/**************************后台统计管理****************************/
Route::get('admin/CountList', 'Admin\CountController@count');

/**************************后台分类管理****************************/
//后台分类列表/搜索
Route::any('admin/CategoryList', 'Admin\CategoryController@cateshow');
//后台分类添加
Route::get('admin/CategoryAdd', 'Admin\CategoryController@cateadd');
Route::post('admin/CategoryAddData', 'Admin\CategoryController@cateadddata');

//后台分类修改
Route::get('admin/CategoryEdit', 'Admin\CategoryController@cateedit');
Route::post('admin/CategoryEditData', 'Admin\CategoryController@cateeditdata');
//后台分类删除
Route::get('admin/CategoryDel', 'Admin\CategoryController@catedel');

/**************************后台良品购分类管理****************************/
//后台良品购分类列表/搜索
Route::any('admin/CategoodsList', 'Admin\CategoodsController@categoodsshow');
//后台良品购分类添加
Route::get('admin/CategoodsAdd', 'Admin\CategoodsController@categoodsadd');
Route::post('admin/CategoodsAddData', 'Admin\CategoodsController@categoodsadddata');
//后台分类修改
Route::get('admin/CategoodsEdit', 'Admin\CategoodsController@categoodsedit');
Route::post('admin/CategoodsEditData', 'Admin\CategoodsController@categoodseditdata');
//后台分类删除
Route::get('admin/CategoodsDel', 'Admin\CategoodsController@categoodsdel');

/***************前台路由*******************/
Route::get('/', function () {
	return view('welcome');
});
//Route::get('home/register', function () {
//    return view('home.register');
//});
Route::get('home/login', function () {
	return view('home.login');
});
//转到首页
Route::any('home/homepage', 'Home\SpecialController@ToHome');
//走到通用详情页
Route::any('home/liangdetail', 'Home\SpecialController@ToLianggoods');
//转到良品购列表页
Route::any('home/liangfashion', 'Home\SpecialController@ToLianglist');
//转到单品详情页
Route::any('home/dandetail', 'Home\SpecialController@ToDangoods');
//单品收藏状态更改,收藏总数更改
Route::any('home/shoudata', 'Home\SpecialController@shoudata');
//单品点赞状态更改,点赞总数更改
Route::any('home/zandata', 'Home\SpecialController@zandata');
//帮帮中心
Route::any('home/help', 'Home\SpecialController@help');
//联系我们
Route::any('home/mail', 'Home\SpecialController@mail');
Route::any('home/maildata', 'Home\SpecialController@maildata');
Route::any('home/hope', 'Home\SpecialController@ToHope');
Route::any('home/special', function () {
	return view('home.special');
});

Route::group(['prefix' => 'user', 'namespace' => 'Home'], function () {
	//去注册
	Route::any('goregister', 'UserRegController@GoRegister');
	//处理注册
	Route::post('reg', 'UserRegController@Check');

	//返回登录页面
	Route::any('gologin', 'LoginController@GoLogin');
	//处理登录信息
	Route::post('login', 'LoginController@DoLogin');
	//退出
	Route::any('logout', 'LoginController@Logout');

	Route::group(['middleware' => 'user.login'], function () {
		//返回个人信息页面
		Route::any('gopersonal', 'PersonInfoController@GoPersonal');
		//得到个人头像
		Route::any('head', 'PersonInfoController@GetHead');
		//添加或者修改个人的信息
		Route::any('personinfo', 'PersonInfoController@PersonInfo');
		//修改密码
		Route::any('setpass', 'PersonInfoController@SetPass');
		//返回个人专辑页/遍历标签
		Route::any('special', 'SpecialController@ToSpecial');
		//星座运势页
		Route::any('xingzuo', 'SpecialController@xingzuo');
		//星座运势页数据处理
		Route::any('xingzuodata', 'SpecialController@xingzuodata');
		//创建个人专辑
		Route::any('create', 'SpecialController@Create');
		//意见反馈
		Route::any('mess', 'MessController@say');
		Route::any('message', 'MessController@Show');
		Route::any('getmess', 'MessController@Getmess');
		//评论接收
		Route::post('ping', 'PingController@getping');
		Route::get('pingdel', 'PingController@delping');
		//进入文章版块
		Route::any('article', 'ArticleController@Index');
		//创建文章
		Route::any('articlecreate', 'ArticleController@Create');
		//添加文章到数据库
		Route::post('addarticle', 'ArticleController@Add');
		//文章列表
		Route::any('articlelist', 'ArticleController@Show');
		//文章修改
		Route::any('articleedit', 'ArticleController@Edit');
		Route::post('articleedited', 'ArticleController@Edited');
		//文章删除
		Route::any('articledel', 'ArticleController@Del');
		//专辑的id，删除整个专辑
		Route::any('delspecial/{id}', 'SpecialController@Delete');
		//编辑整个专辑，专辑的id
		Route::any('editspecial/{id}', 'SpecialController@Edit');
		//专辑的id，显示单个专辑里面的所有相片/传递标签资源
		Route::any('godetailspecial/{id}', 'SpecialController@Detail');
		//单个专辑里面添加相片
		Route::any('adddetailspecial', 'SpecialController@AddDetail');
		//删除单个专辑里面的相片
		Route::any('deldetailspecial/{id}', 'SpecialController@DelDetail');
		//编辑单个专辑里的单张相片
		Route::any('editdetailspecial', 'SpecialController@EditDetail');

	});
});
//获取验证码
Route::any('/getcode', 'Home\UserRegController@GetCode');
//图灵聊天
Route::any('etst', 'Home\SpecialController@ets');
Route::post('etsts', 'Home\SpecialController@ets');